﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="PriceList.aspx.cs" Inherits="VSM.PriceList" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Prices List</h2>
    <asp:HiddenField ID="hdnisUpdate" runat="server" />
    <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div style="margin-left: 5px; width: 99%;">
                <hr />
                <table border="0" width="100%" style="background-color: #D1D4D8; font-weight: bold;">
                    <tr>
                        <td colspan="2" style="width: 100px">
                            <asp:RadioButtonList ID="RadioButtonList1" runat="server" Width="476px">
                                <asp:ListItem Value="0" Selected="True">Update Entire Price List</asp:ListItem>
                                <asp:ListItem Value="1">Update By Selection</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                </table>
                <hr />
                <table style="width: 100%;" border="0">
                    <tr>
                        <td colspan="2">
                            <asp:GridView ID="grvItem" CssClass="GridInner" runat="server" Width="100%" BorderColor="White"
                                BackColor="White" AllowSorting="True" AutoGenerateColumns="false" CellPadding="2"
                                HeaderStyle-Height="27px" CellSpacing="2" OnRowEditing="EditItem" OnRowUpdating="UpdateItem"
                                HeaderStyle-VerticalAlign="Middle" OnRowCancelingEdit="CancelEdit" OnRowDeleting="DeleteItem"
                                OnRowDataBound="grvSearchResult_RowDataBound"   AllowPaging="True" OnPageIndexChanging="grvSearchResult_PageIndexChanging" PageSize="20">
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                <Columns>
                                    <asp:TemplateField HeaderText="Action">
                                        <ItemStyle HorizontalAlign="Center"  Width="10%"/>
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkDelete" runat="server" Text="Delete" OnClick="lnkDelete_Click" OnClientClick='return confirm("Are you sure to delete?");'></asp:LinkButton> | 
                                            <asp:LinkButton ID="lnkView" runat="server" Text='View' BorderStyle="none" OnClick="lblItemCode_Click">
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Price List Name">
                                        <ItemStyle HorizontalAlign="left" Width="17%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lblCardCode" runat="server" Text='<%# Bind("PLName") %>' BorderStyle="none" Enabled="false">
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Based Price List">
                                        <ItemStyle HorizontalAlign="left" Width="17%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtCardName" runat="server" Text='<%# Bind("BasePL") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Factor">
                                        <ItemStyle HorizontalAlign="left" Width="7%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtAddress" runat="server" Text='<%# Bind("Factor") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Rounding Method">
                                        <ItemStyle HorizontalAlign="left" Width="15%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtE_Mail" runat="server" Text='<%# Bind("RoundingMet") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Rounding Rule">
                                        <ItemStyle HorizontalAlign="left" Width="5%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtCustomerType" runat="server" Text='<%# Bind("RoundingRule") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                     <asp:TemplateField HeaderText="Ending Interval">
                                        <ItemStyle HorizontalAlign="left" Width="5%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtCustomerType" runat="server" Text='<%# Bind("EndingInterval") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                     <asp:TemplateField HeaderText="Auth. Group">
                                        <ItemStyle HorizontalAlign="left" Width="5%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtCustomerType" runat="server" Text='<%# Bind("AutorizationGroup") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                     <asp:TemplateField HeaderText="Primary Cur.">
                                        <ItemStyle HorizontalAlign="left" Width="5%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="txtCustomerType" runat="server" Text='<%# Bind("PrimaryCurr") %>' BorderStyle="none" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                </Columns>
                                <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False" Height="27px" VerticalAlign="Bottom" />
                                <EmptyDataTemplate>
                                    <table class="GridInner" style="width: 100%; border-color: White;" border="1" rules="all"
                                        cellspacing="2" cellpadding="2">
                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none; background-color: rgb(96, 149, 201);">
                                            <th style="width: 7%">
                                                <span>Action</span>
                                            </th>
                                            <th style="width: 3%">
                                                <span>#</span>
                                            </th>
                                            <th style="width: 15%">
                                                <span>Price List Name</span>
                                            </th>
                                            <th style="width: 15%">
                                                <span>Base Price List</span>
                                            </th>
                                            <th style="width: 10%">
                                                <span>Factor</span>
                                            </th>
                                            <th style="width: 10%">
                                                <span>Rounding Method</span>
                                            </th>

                                            <th style="width: 10%">
                                                <span>Rounding Rule</span>
                                            </th>
                                            <th style="width: 10%">
                                                <span>Ending Interval</span>
                                            </th>
                                           <th style="width: 10%">
                                                <span>Authorization Group</span>
                                            </th>
                                           <th style="width: 10%">
                                                <span>Primary Currency</span>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="10">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
                <br />
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 400px;">
                                        <asp:Button ID="btnSave" runat="server" Text="Save" Style="background-image: url('../../Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" BorderStyle="Solid" />
                                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" Style="background-image: url('../../Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" BorderStyle="Solid" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                    </td>
                                </tr>
                            </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
